package com.simon.encode;

import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder;

import java.util.List;

public class ByteArrayEncoder extends MessageToMessageEncoder<byte[]>{

    protected void encode(ChannelHandlerContext channelHandlerContext, byte[] bytes, List<Object> list) throws Exception {
        list.add(Unpooled.wrappedBuffer(bytes)) ;
    }
}
